package com.atguigu.serviceedu.controller;

import com.atguigu.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author JY
 * @create 2021-01-16 11:55
 */
@RestController
@RequestMapping("/serviceedu/user")
//@CrossOrigin
public class EduLoginController {

    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    @GetMapping("info")
    public R getInfo(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar",
                "https://pluto-1300780100.cos.ap-nanjing.myqcloud.com/img/6b1790b161aeec44249833a4a4a8c017d60d247f.jpg@518w.jpg");
    }
}
